package cn.tedu._03vehicle.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

@Data
public class UserRegParam {
//    @NotNull(message = "用户名不能为null")   //这个只是提示消息
//    @NotEmpty(message = "用户名不能为null和空字符串")
//    @NotBlank(message = "用户名不能为null和空字符串和空格")
//    @Size(max=11  , min =6 ,message = "用户名必须在6~11位之间")
    @Pattern(regexp = "^(?:[a-zA-Z0-9_-]{1,14}|[\\u4e00-\\u9fa5]{1,7})$",message = "最长位14个英文或7个汉字")
    @ApiModelProperty(value = "用户名", required = true)
    private String username;
    @ApiModelProperty(value = "密码", required = true)
    private String password;
    @Email(message = "邮箱格式不正确")
    @ApiModelProperty(value = "邮箱", required = true)
    private String email;
    @ApiModelProperty(value = "电话", required = true)
    private String phone;
}
